<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<!-- Maven coordinates -->
	<groupId>my.mimos.khtp</groupId>
	<artifactId>jspsample</artifactId>
	<version>1.0-SNAPSHOT</version>
	<name>jspsample</name>
	<description>Jsp Sample</description>
	<packaging>war</packaging>
	<properties>
		<jee.version>6.0</jee.version>
		<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<!-- Uses JEE, JSP, Servlet -->
		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-web-api</artifactId>
			<version>${jee.version}</version>
			<scope>provided</scope>
			<optional>true</optional>
		</dependency>
		<!-- For demo using logging within JEE application -->
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.14</version>
			<scope>compile</scope>
		</dependency>
	</dependencies>
	<build>
		<finalName>${project.artifactId}</finalName>
		<plugins>
			<plugin>
				<groupId>com.keyboardsamurais.maven</groupId>
				<artifactId>maven-timestamp-plugin</artifactId>
				<version>1.0</version>
				<configuration>
					<propertyName>startTime</propertyName>
					<timestampPattern>yyyy.MM.dd-HH.mm.ss</timestampPattern>
				</configuration>
				<executions>
					<execution>
						<phase>clean</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.github.goldin</groupId>
				<artifactId>copy-maven-plugin</artifactId>
				<version>0.2.5</version>
				<executions>
					<execution>
						<id>backup-source</id>
						<phase>package</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<resources>
								<resource>
									<!-- complete source directory backup excluding this pom.xml file. -->
									<targetPath>${project.basedir}/src-bakup/${project.artifactId}-src-${startTime}.zip
									</targetPath>
									<directory>${project.basedir}/src</directory>
									<pack>true</pack>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<compilerArguments>
						<endorseddirs>${endorsed.dir}</endorseddirs>
					</compilerArguments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<configuration>
					<failOnMissingWebXml>false</failOnMissingWebXml>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.8</version>
			</plugin>
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<version>7.6.9.v20130131</version>
				<configuration>
					<webApp>
						<contextPath>/${project.artifactId}</contextPath>
					</webApp>
					<war>${basedir}/target/${project.artifactId}.war</war>
				</configuration>
				<executions>
					<execution>
						<id>Run-War</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>run-war</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
